﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default_edit.aspx.cs" Inherits="EM.admin.roles.default_edit" %>

<%@ Register Src="~/Common/PageName.ascx" TagName="PageName" TagPrefix="uc1" %>
<%@ Register Src="~/Common/SectionName.ascx" TagName="SectionName" TagPrefix="uc3" %>
<%@ Register Src="~/Common/Header.ascx" TagName="Header" TagPrefix="uc2" %>
<%@ Register Src="~/Common/Footer.ascx" TagName="Footer" TagPrefix="uc4" %>
<%@ Register Assembly="RadAjax.Net2" Namespace="Telerik.WebControls" TagPrefix="radA" %>
<%@ Register Assembly="RadTabStrip.Net2" Namespace="Telerik.WebControls" TagPrefix="radTS" %>
<%@ Register Assembly="RadGrid.Net2" Namespace="Telerik.WebControls" TagPrefix="radG" %>
<%@ Register Assembly="RadCalendar.Net2" Namespace="Telerik.WebControls" TagPrefix="radCln" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link runat="server" id="linkCss" rel="stylesheet" href="~/css/master.css" type="text/css" />
    <link runat="server" id="linkcssbuttons" rel="stylesheet" href="~/css/buttons.css"
        type="text/css" />
</head>
<script type="text/javascript">
    function RowSelected() {
        window["<%= RadAjaxPanel1.ClientID %>"].AjaxRequest("Select", "");
    }
</script>
<body>
    <form id="form1" runat="server">
    <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
        <tr>
            <td class="TdMainContent" valign="top">
                <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td class="TdPageName" colspan="2">
                            <uc1:PageName ID="PageName" PAGEID="7" PAGEWIDTH="900" runat="server"></uc1:PageName>
                        </td>
                    </tr>
                    <tr>
                        <td id="TdMainLeft" class="TdMainLeft" valign="top">
                            <div id="ContentLeft">
                                <div class="RightTabDivHeader">
                                    <asp:Label ID="lblRoles" runat="server"></asp:Label>
                                    <radTS:RadTabStrip ID="rtsRole" runat="server" MultiPageID="rmpRole" Skin="masterTab"
                                        Orientation="VerticalLeftToRight" SelectedIndex="0">
                                        <Tabs>
                                            <radTS:Tab ID="tabMasterInfo" PageViewID="pvGeneralInfo" Text="Genel Bilgiler">
                                            </radTS:Tab>
                                            <radTS:Tab ID="tabContactInfo" PageViewID="pvAccessPrivilages" Text="Sayfa Hakları">
                                            </radTS:Tab>
                                            <radTS:Tab ID="tabCareerInfo" PageViewID="pvUsers" Text="Kullanıcılar">
                                            </radTS:Tab>
                                        </Tabs>
                                    </radTS:RadTabStrip>
                                </div>
                            </div>
                        </td>
                        <td id="TdMainRight" valign="top" width="100%">
                            <div id="ContentRight">
                                <asp:HiddenField ID="hdnROLEID" runat="server" />
                                <radTS:RadMultiPage ID="rmpRole" runat="server">
                                    <radTS:PageView ID="pvGeneralInfo" runat="server" CssClass="Pg">
                                        <table class="MasterEditTable" cellpadding="0" cellspacing="0" border="0">
                                            <tr>
                                                <td class="EditTableLable_Td">
                                                    Role:
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="txtROLENAME" runat="server" MaxLength="1000" class="EditinputRq"
                                                        Style="width: 200px;"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="rfvROLENAME" runat="server" ControlToValidate="txtROLENAME"
                                                        ValidationGroup="vgGI" Display="None" ErrorMessage="Lütfen role adı giriniz"></asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="EditTableLable_Td">
                                                    Durum:
                                                </td>
                                                <td>
                                                    <asp:DropDownList ID="ddlROLESTATUS" runat="server" class="EditinputRq" Style="width: 200px;">
                                                    </asp:DropDownList>
                                                    <asp:RequiredFieldValidator ID="rfvROLESTATUS" runat="server" ControlToValidate="ddlROLESTATUS"
                                                        ValidationGroup="vgGI" Display="None" ErrorMessage="Lütfen durum seçiniz"></asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="EditTableLable_Td">
                                                    Başlangıç Tarihi:
                                                </td>
                                                <td>
                                                    <radCln:RadDatePicker ID="rdpSTARTDATE" runat="server" SharedCalendarID="sharedCalendar"
                                                        DateInput-DateFormat="dd.MM.yyyy" MaxDate="01/01/2099" MinDate="01/01/2000" Width="95">
                                                        <DateInput Skin="masterRQ"></DateInput>
                                                    </radCln:RadDatePicker>
                                                    <asp:RequiredFieldValidator ID="rfvSTARTDATE" runat="server" ControlToValidate="rdpSTARTDATE"
                                                        ValidationGroup="vgGI" Display="None" ErrorMessage="Lütfen başlangıç tarihi giriniz"></asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="EditTableLable_Td">
                                                    Bitiş Tarihi:
                                                </td>
                                                <td>
                                                    <radCln:RadDatePicker ID="rdpENDDATE" runat="server" SharedCalendarID="sharedCalendar"
                                                        DateInput-DateFormat="dd.MM.yyyy" MaxDate="01/01/2099" MinDate="01/01/2000" Width="95">
                                                        <DateInput Skin="master"></DateInput>
                                                    </radCln:RadDatePicker>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="EditTableLable_Td">
                                                    Max. Oturum Sayısı:
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="txtMAXSESSIONCOUNT" runat="server" MaxLength="4" CssClass="EditinputRq"
                                                        Style="width: 200px; text-align: right;"></asp:TextBox>
                                                </td>
                                                <asp:RequiredFieldValidator ID="rfvMAXSESSIONCOUNT" runat="server" ControlToValidate="txtMAXSESSIONCOUNT"
                                                    ValidationGroup="vgGI" Display="None" ErrorMessage="Lütfen Maksimum Oturum Sayısını Giriniz."></asp:RequiredFieldValidator>
                                                <asp:CompareValidator ID="cvMAXSESSIONCOUNT" Operator="DataTypeCheck" ValidationGroup="vgGI"
                                                    Type="Integer" runat="server" ControlToValidate="txtMAXSESSIONCOUNT" ErrorMessage="Lütfen Max.Oturum Sayısını Kontrol Ediniz."
                                                    Display="None" Width="0"></asp:CompareValidator>
                                            </tr>
                                            <tr>
                                                <td class="EditTableLable_Td">
                                                    Açıklama:
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="txtDESCRIPTION" runat="server" TextMode="MultiLine" MaxLength="2000"
                                                        Style="width: 200px; height: 50px;"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <div runat="server" id="trWorkgroup">
                                                <tr>
                                                    <td class="EditTableLable_Td">
                                                        Çalışma Grubu:
                                                    </td>
                                                    <td>
                                                        <asp:DropDownList ID="ddlWorkGroup" CssClass="Editinput" Width="200px" runat="server">
                                                        </asp:DropDownList>
                                                    </td>
                                                </tr>
                                            </div>
                                            <tr>
                                                <td colspan="2" style="text-align: right; height: 24px;">
                                                </td>
                                            </tr>
                                        </table>
                                        <div style="width: 550px">
                                            <asp:ValidationSummary ID="vsGI" runat="server" DisplayMode="BulletList" Width="0px"
                                                ShowSummary="false" ShowMessageBox="true" ValidationGroup="vgGI" />
                                            <a id="btnReturn" style="float: right;" class="btn_left xp_cancel" runat="server"
                                                href="javascript:window.close();"><strong class="btn_rigth_xp xp">Kapat</strong>
                                            </a>
                                            <asp:LinkButton ID="btnGISave" Style="float: right" CssClass="btn_left xp_ok" runat="server"
                                                OnClick="btnGISave_Click" ValidationGroup="vgGI">
                                                <strong class="btn_rigth_xp xp">
                                                    <asp:Label ID="lblGISave" runat="server">Kaydet</asp:Label></strong>
                                            </asp:LinkButton>
                                        </div>
                                    </radTS:PageView>
                                    <radTS:PageView ID="pvAccessPrivilages" runat="server" CssClass="Pg">
                                        <radA:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
                                            <radCln:RadCalendar ID="sharedCalendar" runat="server" Skin="Default" RangeMinDate="01/01/2000">
                                            </radCln:RadCalendar>
                                            <table>
                                                <tr>
                                                    <td valign="top" width="350">
                                                        <uc3:SectionName ID="SectionName1" PAGESECTIONID="5" runat="server" PAGEWIDTH="350">
                                                        </uc3:SectionName>
                                                        <div id="GrdDivMaster">
                                                            <radG:RadGrid ID="rgAPMasterPA" runat="server" Skin="master" GridLines="None" PageSize="20"
                                                                AllowPaging="True" AllowSorting="True" ShowStatusBar="true" Width="350" AutoGenerateColumns="False"
                                                                EnableAJAX="false" LoadingTemplateTransparency="55" EnableAJAXLoadingTemplate="True"
                                                                OnNeedDataSource="rgAPMasterPA_NeedDataSource" OnItemDataBound="rgAPMasterPA_ItemDataBound">
                                                                <PagerStyle Mode="NumericPages" />
                                                                <MasterTableView GridLines="None" DataKeyNames="PAGEID,PARENTPAGEID,HASCHILDPAGE,HASROLEPAGE">
                                                                    <Columns>
                                                                        <radG:GridBoundColumn UniqueName="MENUNAME " DataField="MENUNAME" HeaderText="Sayfa">
                                                                            <HeaderStyle Width="250" HorizontalAlign="left" />
                                                                            <ItemStyle Width="250" HorizontalAlign="left" />
                                                                        </radG:GridBoundColumn>
                                                                        <radG:GridBoundColumn UniqueName="TYPE " DataField="TYPE" HeaderText="Sayfa Tipi">
                                                                            <HeaderStyle Width="80" HorizontalAlign="left" />
                                                                            <ItemStyle Width="80" HorizontalAlign="left" />
                                                                        </radG:GridBoundColumn>
                                                                        <radG:GridTemplateColumn UniqueName="Edit">
                                                                            <HeaderStyle Width="20" HorizontalAlign="left" />
                                                                            <ItemStyle Width="20" HorizontalAlign="left" />
                                                                            <%--<HeaderTemplate>
                                                                            <label class="Grid_Table_Header"><asp:Label ID="lblGrant" runat="server" >İşlemler</asp:Label></label>
                                                                        </HeaderTemplate>--%>
                                                                            <ItemTemplate>
                                                                                <asp:CheckBox ID="chkGrantPA" runat="server" AutoPostBack="true" OnCheckedChanged="chkGrantPA_CheckedChanged" />
                                                                            </ItemTemplate>
                                                                        </radG:GridTemplateColumn>
                                                                    </Columns>
                                                                </MasterTableView>
                                                                <ClientSettings>
                                                                    <Selecting AllowRowSelect="true" />
                                                                    <ClientEvents OnRowSelected="RowSelected" />
                                                                </ClientSettings>
                                                                <PagerStyle Mode="NumericPages" />
                                                            </radG:RadGrid>
                                                        </div>
                                                    </td>
                                                    <td width="10">
                                                        &nbsp;
                                                    </td>
                                                    <td valign="top" width="500">
                                                        <uc3:SectionName ID="SectionName3" PAGESECTIONID="6" runat="server" PAGEWIDTH="500">
                                                        </uc3:SectionName>
                                                        <div id="GrdDivMaster">
                                                            <radG:RadGrid ID="rgAPMasterFA" runat="server" Skin="master" GridLines="None" PageSize="20"
                                                                AllowPaging="True" AllowSorting="True" ShowStatusBar="true" Width="500" AutoGenerateColumns="False"
                                                                EnableAJAX="false" LoadingTemplateTransparency="55" EnableAJAXLoadingTemplate="True"
                                                                OnItemDataBound="rgAPMasterFA_ItemDataBound" OnItemCommand="rgAPMasterFA_ItemCommand">
                                                                <PagerStyle Mode="NumericPages" />
                                                                <MasterTableView GridLines="None" DataKeyNames="PAGEFUNCTIONID,PAGEID">
                                                                    <Columns>
                                                                        <radG:GridBoundColumn UniqueName="PAGEFUNCTIONID" DataField="PAGEFUNCTIONID" Visible="false">
                                                                        </radG:GridBoundColumn>
                                                                        <radG:GridBoundColumn UniqueName="PAGEID" DataField="PAGEID" Visible="false">
                                                                        </radG:GridBoundColumn>
                                                                        <radG:GridTemplateColumn UniqueName="FUNCTION" HeaderText="Fonksiyon">
                                                                            <HeaderStyle Width="200" HorizontalAlign="left" />
                                                                            <ItemStyle Width="200" HorizontalAlign="left" />
                                                                            <ItemTemplate>
                                                                                <div style="width: 200px">
                                                                                    <%#Eval("FUNCTIONCODE")%></div>
                                                                                <div style="margin: 2 0 0 5; font-size: 10px; width: 200px">
                                                                                    <i>
                                                                                        <%#Eval("FUNCTIONDESC")%></i></div>
                                                                            </ItemTemplate>
                                                                        </radG:GridTemplateColumn>
                                                                        <radG:GridTemplateColumn UniqueName="StartDate">
                                                                            <HeaderStyle Width="95" HorizontalAlign="left" />
                                                                            <ItemStyle HorizontalAlign="left" />
                                                                            <HeaderTemplate>
                                                                                <label class="Grid_Table_Header">
                                                                                    <asp:Label ID="lblStartDate" runat="server">Başlangıç Tarihi</asp:Label></label>
                                                                            </HeaderTemplate>
                                                                            <ItemTemplate>
                                                                                <radCln:RadDatePicker ID="rdpFASTARTDATE" runat="server" DateInput-DateFormat="dd.MM.yyyy"
                                                                                    MaxDate="01/01/2090" MinDate="01/01/2009" Width="95">
                                                                                    <DateInput Skin="masterRQ"></DateInput>
                                                                                </radCln:RadDatePicker>
                                                                                <asp:RequiredFieldValidator ID="rfvFASTARTDATE" runat="server" ControlToValidate="rdpFASTARTDATE"
                                                                                    InitialValue="2000-01-01" Display="None"></asp:RequiredFieldValidator>
                                                                            </ItemTemplate>
                                                                        </radG:GridTemplateColumn>
                                                                        <radG:GridTemplateColumn UniqueName="EndDate">
                                                                            <HeaderStyle Width="95" HorizontalAlign="left" />
                                                                            <ItemStyle HorizontalAlign="left" />
                                                                            <HeaderTemplate>
                                                                                <label class="Grid_Table_Header">
                                                                                    <asp:Label ID="lblEndDate" runat="server">Bitiş Tarihi</asp:Label></label>
                                                                            </HeaderTemplate>
                                                                            <ItemTemplate>
                                                                                <radCln:RadDatePicker ID="rdpFAENDDATE" runat="server" DateInput-DateFormat="dd.MM.yyyy"
                                                                                    MaxDate="01/01/2090" MinDate="01/01/2000" Width="95">
                                                                                    <DateInput Skin="master"></DateInput>
                                                                                </radCln:RadDatePicker>
                                                                            </ItemTemplate>
                                                                        </radG:GridTemplateColumn>
                                                                        <radG:GridTemplateColumn UniqueName="Check">
                                                                            <HeaderStyle Width="20" HorizontalAlign="left" />
                                                                            <ItemStyle Width="20" HorizontalAlign="left" />
                                                                            <HeaderTemplate>
                                                                                <label class="Grid_Table_Header">
                                                                                    <asp:Label ID="lblGrant" runat="server"></asp:Label></label>
                                                                            </HeaderTemplate>
                                                                            <ItemTemplate>
                                                                                <asp:CheckBox ID="chkGrantFA" runat="server" />
                                                                            </ItemTemplate>
                                                                        </radG:GridTemplateColumn>
                                                                        <radG:GridTemplateColumn UniqueName="Edit">
                                                                            <HeaderStyle HorizontalAlign="center" Width="30" />
                                                                            <ItemStyle HorizontalAlign="center" />
                                                                            <HeaderTemplate>
                                                                                <label class="Grid_Table_Header">
                                                                                    <asp:Label ID="lblActions" runat="server"></asp:Label></label>
                                                                            </HeaderTemplate>
                                                                            <ItemTemplate>
                                                                                <asp:ValidationSummary ID="vsAP" runat="server" DisplayMode="BulletList" Width="0px"
                                                                                    ShowSummary="false" ShowMessageBox="true" />
                                                                                <asp:LinkButton ID="btnSave" runat="server" CommandName="Save" CommandArgument='<%#Eval("PAGEFUNCTIONID")%>'>Kaydet</asp:LinkButton>
                                                                            </ItemTemplate>
                                                                        </radG:GridTemplateColumn>
                                                                    </Columns>
                                                                </MasterTableView>
                                                                <PagerStyle Mode="NumericPages" />
                                                            </radG:RadGrid>
                                                        </div>
                                                    </td>
                                                </tr>
                                            </table>
                                        </radA:RadAjaxPanel>
                                        <table>
                                            <tr>
                                                <td>
                                                    <br />
                                                    <div style="width: 850px">
                                                        <asp:LinkButton ID="btnAPRecompileMenu" CssClass="btn_left xp_add" runat="server"
                                                            OnClick="btnAPRecompileMenu_OnClick">
                                                            <strong class="btn_rigth_xp xp">
                                                                <asp:Label ID="lblAPRecompileMenu" runat="server">Menüyü Güncelle</asp:Label></strong>
                                                        </asp:LinkButton>
                                                        <a id="btnReturn1" style="float: right;" class="btn_left xp_cancel" href="javascript:window.close();"
                                                            runat="server"><strong class="btn_rigth_xp xp">Kapat</strong> </a>
                                                    </div>
                                                </td>
                                            </tr>
                                        </table>
                                    </radTS:PageView>
                                    <radTS:PageView ID="pvUsers" runat="server" CssClass="Pg">
                                        <div>
                                            <uc3:SectionName ID="SectionName2" PAGESECTIONID="7" PAGEWIDTH="600" runat="server">
                                            </uc3:SectionName>
                                        </div>
                                        <div style="width: 600px">
                                            <radG:RadGrid ID="rgRUMaster" runat="server" Skin="master" GridLines="None" PageSize="20"
                                                AllowPaging="True" AllowSorting="True" ShowStatusBar="true" Width="600" AutoGenerateColumns="False"
                                                EnableAJAX="true" LoadingTemplateTransparency="55" EnableAJAXLoadingTemplate="True"
                                                OnNeedDataSource="rgRUMaster_NeedDataSource" OnItemDataBound="rgRUMaster_ItemDataBound">
                                                <PagerStyle Mode="NumericPages" />
                                                <MasterTableView GridLines="None" DataKeyNames="USERROLEID">
                                                    <Columns>
                                                        <radG:GridBoundColumn UniqueName="USERROLEID" DataField="USERROLEID" Visible="false">
                                                        </radG:GridBoundColumn>
                                                        <radG:GridBoundColumn UniqueName="USERCODE" DataField="USERCODE" HeaderText="Kullanıcı Kodu">
                                                            <HeaderStyle HorizontalAlign="left" />
                                                            <ItemStyle HorizontalAlign="left" />
                                                        </radG:GridBoundColumn>
                                                        <radG:GridBoundColumn UniqueName="USERDESC" DataField="USERDESC" HeaderText="Kullanıcı Adı">
                                                            <HeaderStyle HorizontalAlign="left" />
                                                            <ItemStyle HorizontalAlign="left" />
                                                        </radG:GridBoundColumn>
                                                        <radG:GridBoundColumn UniqueName="STARTDATE" DataField="STARTDATE" DataFormatString="{0:dd/MM/yyyy}"
                                                            HeaderText="Başlangıç Tarihi">
                                                            <HeaderStyle HorizontalAlign="left" />
                                                            <ItemStyle HorizontalAlign="left" />
                                                        </radG:GridBoundColumn>
                                                        <radG:GridBoundColumn UniqueName="ENDDATE" DataField="ENDDATE" DataFormatString="{0:dd/MM/yyyy}"
                                                            HeaderText="Bitiş Tarihi">
                                                            <HeaderStyle HorizontalAlign="left" />
                                                            <ItemStyle HorizontalAlign="left" />
                                                        </radG:GridBoundColumn>
                                                    </Columns>
                                                </MasterTableView>
                                                <PagerStyle Mode="NextPrevAndNumeric" />
                                            </radG:RadGrid>
                                        </div>
                                        <div style="width: 600px; padding-top: 15px">
                                            <a id="btnReturn2" style="float: right;" class="btn_left xp_cancel" runat="server"
                                                href="javascript:window.close();"><strong class="btn_rigth_xp xp">Kapat</strong>
                                            </a>
                                        </div>
                                        <br />
                                    </radTS:PageView>
                                </radTS:RadMultiPage>
                            </div>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
